package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.SysDictData;
import com.ruoyi.system.api.factory.RemoteDictFallbackFactory;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(contextId = "remoteDictService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteDictFallbackFactory.class)
public interface RemoteDictService {

    @GetMapping(value = "/dict/data/info/type/{dictType}")
    public R<List<SysDictData>> getDictType(@PathVariable("dictType") String dictType);


    @PostMapping("/dict/data/info/type/DictTypeName/getDictTypeName")
    public R<SysDictData> getDictTypeName(@RequestBody SysDictData dictData);

}
